home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS Toolkit
/
BBS Toolkit.iso
/
wildcat
/
wc30rec.zip
/
WC30REC.NEW
< prev
Wrap
Text File
|
1992-12-18
|
20KB
|
513 lines
FILER 5.4x COMPATIBILITY
------------------------
TurboPower has recently introduced a new version of Btree Filer that is
incompatable with the Filer 5.2x that Wildcat and it's various utilities
are built with. Filer 5.4x must be patched in order to work properly with
Wildcat. The new version of Filer automatically determines workstation
numbers while Wildcat bases workstation numbers on the node id. Here are
the changes that allow the new Filer to work with Wildcat:
In FILER.PAS add the following:
const
IsamWSNr : Word = 0;
Replace the routines IsamRelaseLocalWSNr and IsamDetermineLocalWSNR in
ISAMNWRK.INC with following routines:
procedure IsamReleaseLocalWSNr(FHandle, LocalWSNr : Word);
begin
IsamOk := True;
end;
procedure IsamDetermineLocalWSNr(FHandle : Word; var LocalWSNr : Word);
begin
if IsamWSNr = 0 then begin
IsamOK := False;
IsamError := 10306;
end else begin
IsamOk := True;
LocalWSNr := IsamWSNr;
end;
end;
NOTE: It will be necessary to initialize IsamWSNr with the NodeId of the
current node before called BtInitIsam.
3.5 UPDATE INFORMATION
----------------------
The Wildcat 3.50 release has made changes to one of the keys in the message
database. Key #4 has changed in length from 4 bytes in the previous versions
to 21 bytes in the new version. Any utility which updates the message database
keys will have to use the new routines to work properly with 3.50.
The following routines in our samples files have been updated to support
the new keys:
BTREEO - OpenMessageDatabase
MSGUTIL - BuildMsgKey
The new code now builds key #4 by packing the subject and then adding the
message number to the end of the key.
NOTICE
------
Wildcat! has undergone a MAJOR REVISION with version 3.0. Like every version
since version 1.0, it is faster and requires less memory then it predecessor.
These improvements do come at a cost however. The cost is any 3rd party
utility written for Wildcat! will have to be rewritten to support the
new structures and file naming conventions.
Wildcat! utilitizes file and record locking in both the M and the P versions.
This means that utilities for these versions can be designed to run while
other Wildcat! nodes are up.
These structures the same for all 3 versions of Wildcat!.('S', 'M', 'P').
USING THIS FILE
---------------
This file contains a description of each of the sample pascal files
enclosed for accessing the Wildcat! databases. Also included is information
on the third party toolkits used by Mustang Software when writing Wildcat!.
A tutorial describing the utilization of the new Flags and BitSets used in
3.0. Plus information on the door file formats.
TOOLBOXES
---------
If you want to write full blown Wildcat! utilities, then you'll need to
purchase the same B-Tree file management package used by us. The package
is called B-Tree Filer, and may be purchased directly from:
Turbo Power Software
P.O. Box 49009
Colorado Springs, CO 80949-9009
Office (719) 260-6641
Orders (800) 333-4160
Fax (719) 260-4160
CompuServe 72457,2131
Please be sure to mention you're a Wildcat! Sysop when placing
your order and ask them about the Wildcat! Sysop Special.
SPECIAL NOTES FOR DEVELOPERS USING TURBO PROFESSIONAL OR BTREE FILER
--------------------------------------------------------------------
Turbo Professional & Object Professional
----------------------------------------
The FourByteDates define in TPRO & OPRO must be disabled for to
access the date and time fields in Widlcat! 3.0. Failure to do so
will return the wrong size of your data structure.
Filer
-----
The settings in Btree Filer must be exactly like these listed in order
for Filer to function properly with Wildcat!:
MaxNrOfKeys = 10;
MaxKeyLen = 30;
MaxNrOfWorkStations = 250;
DatExtension = 'DAT';
IxExtension = 'IX';
DiaExtension = 'DIA';
SavExtension = 'SAV';
MsgExtension = 'MSG';
NOTE: The WordToKey, Pack6bitKeyUC routines used to pack the keys in the
database come from NumKeys unit that is distributed with Filer.
Async Professional
------------------
Turbo Power has also released a set of Async tools for Turbo Pascal.
These tools are great for writing doors and other 3rd party
utilities for WILDCAT! which require async routines.
GLOTYPE.PAS
-----------
This file contains the actual Wildcat 3.0 Turbo Pascal structures. It makes
the assumption that you have the Turbo Professional and B-Tree Filer
libraries from TurboPower Software. Here are the types from the TpDate
and Filer units for those of your that don't have these libraries:
TpDate Types
------------
This unit is from Turbo Powers Turbo Professional. It contains the
julian date and time routines used throughout Wildcat!. Here are the
required type declarations for those of you that don't have Turbo
Professional:
type
Date : Word; {number of days since 1/1/1900}
Time : LongInt; {number of seconds since midnight}
DateTimeRec = record {record containing a date/time value}
D : Date;
T : Time;
end;
NOTE: OPRO/TPRO Users: WILDCAT! uses 2 byte date formats.
Filer
-----
type
NetSupportType = (NoNet, Novell, MsNet);
AutoNode Generation
-------------------
AUTONODE.DAT is a file of Bytes. Position Zero (0) is Node 1.
The Byte is used as bitflags:
const
anCanAutoAssign = $01; { Can be assigned if not current in use }
anInUse = $02; { is currently in use }
Node Numbers
------------
Due to a way Filer initializes the ISAMWSNR and returns the actual
workstation number under Novell, all 3rd party developers should
take care when initializing BTREE FILER. Here is the correct
method:
procedure InitializeBtree;
var
PageStackSize : LongInt;
begin
{- If AutoNode feature is turn on, get next node number from AUTONODE.DAT}
if mwFlagSet(mwAutoid) and (Cfig.Nodeid = 0) then
Cfig.Nodeid := GetNextAutoNode;
if (Cfig.NodeId = 0) then
LogFatalError('Error getting node id number', 9003);
{-Set Filers IsamWSNr}
IsamWSNr := Cfig.NodeId;
PageStackSize := BTInitIsam(Cfig.Network, MinimizeUseOfNormalHeap, 0);
{ **REQUIRED** Reset in case Filer changed it to the actual WorkStation ID }
IsamWSNr := Cfig.NodeId;
if (not IsamOK) then
begin
WriteLn('Insufficient memory for pagestack ', IsamError);
Halt;
end;
if (not BTSetVariableRecBuffer(512)) then
begin
WriteLn('Insufficient memory for record buffer ', IsamError);
Halt;
end;
end;
Flags
-----
Wildcat! 3.0 has moved many boolean fields into packed bitfields to
save space. Here are a few sample routines for accessing a word
based flag. To use with other data types all that is requires is
to change the type from Byte to the desired type.
function ByteFlagIsSet(Flag : Byte; Mask : Byte) : Boolean;
{-Determine is flags set in Mask are set in Flag}
begin
FlagIsSet := Flag and Mask = Mask;
end;
procedure SetByteFlag(var Flag : Byte; Mask : Byte);
{-Set flags contained in Mask in variable passed in Flag}
begin
Flag := Flag or Mask;
end;
procedure ToggleByteFlag(var Flag : Byte; Mask : Byte);
{-Toggle flags contained in Mask in variable passed in Flag}
begin
Flag := Flag xor Mask;
end;
procedure ClearByteFlag(var Flag : Byte; Mask : Byte);
{-Clear flags contained in Mask in variable passed in Flag}
begin
Flag := Flag and not Mask;
end;
BitSets
-------
Wildcat! utilizies bitsets to reduce memory requirements. Instead of
having a huge structure containing an array of boolean type we pack
each of the booleans down into individual bits in a byte. This allows
us to save much storage. Here are some example routines access these
bitsets. These examples utilized the functions from the flags example
above.
type
ByteArrayPtr = ^ByteArray;
ByteArray = array[0..65520] of Byte;
function BitIsSet(BPtr : ByteArrayPtr; Element : Word) : Boolean;
begin
BitIsSet := ByteFlagIsSet(BPtr^[Element shr 3], 1 shl (Element and 7));
end;
procedure SetBit(BPtr : ByteArrayPtr; Element : Word);
begin
SetByteFlag(BPtr^[Element shr 3], 1 shl (Element and 7));
end;
procedure ClearBit(BPtr : ByteArrayPtr; Element : Word);
begin
ClearByteFlag(BPtr^[Element shr 3], 1 shl (Element and 7));
end;
BTREEO.PAS
----------
This unit contains source code for opening and creating the Wildcat!
databases uses B-Tree Filer. This unit by itself will not compile but
should contain enough code to show you how to open the databases.
BTREEU.PAS
----------
This unit contains source code for adding, updating, and deleting user
records from the Wildcat! databases using B-Tree Filer. This unit by itself
will not compile but should contain enough code to show you how to
utilize the user database.
BTREEF.PAS
----------
This unit contains source code for adding, updating, and deleting file
records from the Wildcat! databases using B-Tree Filer. This unit by itself
will not compile but should contain enough code to show you how to
utilize the file database.
MSGUTIL.PAS
-----------
This unit contains source code for adding, updating, and deleting message
records from the Wildcat! databases using B-Tree Filer. This unit by itself
will not compile but should contain enough code to show you how to
utilize the message database.
Special considerations
----------------------
The text in a message is now stored in an array of bytes. Each line
is deliminated with a carriage return ascii 13 character. The end of the
entire message text is delminated with a control Z ascii 26 character.
Wildcat! requires that no line in the message base be longer the 79
characters not including the 13 character. The MsgBytes field contains the
number of characters stored in the text array including the final control
z character.
The contents of the old MESSAGE.DAT have been moved to the first record
of the message database. (RefNr = 1) The only enforced requirement is
to make sure the Len field of this MsgStatusType always be iniatialized
with the value of 12. Also this record should be read with BtGetRec and
updated with BtPutRec utilizing a RefNr of 1 instead of using the
coresponding routines in the Filer VRec unit. If the VRec routines
are used the database will become corrupted.
BTREEL.PAS
----------
This unit contains miscellaneous routines utilizing B-Tree Filer routines
under record and file locking conditions. This unit by itself will not
compile but should contain enough code to show you how to use B-Tree Filer
under networking conditions.
DOOR STRUCTURES
---------------
With the release of v3.0 Wildcat! no longer creates CALLINFO.BBS. The
decision to drop CALLINFO.BBS came about due to our desire to support
the generic DOOR.SYS format used by RBBS/GAP & PCBOARD.
However, DOOR.SYS doesn't contain all the information necessary for
Wildcat! v3.0. Therefore, we also create a file called USERINFO.DAT
which gets created in the \WCWORK\NODEx (x = Node Number) directory.
This is a standard text file.
Here is the format for our new USERINFO.DAT file:
Jim Harrer { Line 1 - Full Users Name }
LOCAL { Line 2 - Connect Rate or LOCAL }
8 { Line 3 - Databits }
Y { Line 4 - 'Y' or 'N' for Ansi Enabled }
Y { Line 5 - 'Y' or 'N' for MNP Connection }
14:22 02/22/91 { Line 6 - Time and Date of Call }
14:28 02/22/91 { Line 7 - Time and Date entered door }
52 { Line 8 - Minutes remaining }
N { Line 9 - Started with a CommandLine switch }
0 { Line 10 - Current Conference }
0 { Line 11 - Active Menu # (0=Main,1=Msg,2=File,3=Sysop)}
NEWUSER { Line 12 - Security level name }
60 { Line 13 - Banked time. (DLT - MaxLogOn) }
1 { Line 14 - Door number }
THEBOSS { Line 15 - Alias Name, if they have one }
N { Line 16 - 'Y' or 'N' did the caller hang-up in door }
0 { Line 17 - # of files downloaded }
0 { Line 18 = # of Kilobytes downloaded }
=======================================================
Here is the format for DOOR.SYS
=======================================================
03/14/88 - Submitted by the "Limited Release Software Group"
Updated: 03/21/88
Updated: 10/22/88 KG
Updated: 07/07/90 KG, to add additional info for Raymond Clements
Updated: 07/14/91 Note to developers added by Jim Harrer/Mustang Software.
=============================================================================
Sample DOOR.SYS file to be used as a STANDARD for ALL Bulletin Board Systems.
=============================================================================
This file format has been laid out and will be presented to ALL BBS authors
in an attempt to establish a national standard for door program applications.
BBS AUTHORS: I urge you to consider this STANDARD with respect for your 3rd
party support authors. Come on guys, make life EASY for us.
(BIG GRIN)
=============================================================================
I have tried to include EVERYTHING a 3rd party DOOR author would need to
provide the SYSOPS with the look and feel they want from an online program
while at the same time keeping things plain and simple to ease the problems
of interfacing programs with a system.
This type of format is intended to be a "read-only" type of file
(although it could be written again) because most BBS's have some sort
of other file they use for re-entering the system with (PCBoard uses
PCBOARD.SYS) which is harder to read in, and changes frequently.
This file format, once established, wouldn't need to be changed EVERYTIME
a new version of the BBS software gets released and this would also
ease the demand for more info being made available in the BBS Re-Entry
file thus making life easier for both parties. If there is something
found in the following format that your BBS software may not be currently
supporting, a DEFAULT value has been suggested.
----------
KG, Note:
GAP DOES treat this file as Read/Write since GAP does not use
or have any use for a Door File. GAP will re-read the DOOR.SYS upon
return from a door. But not all fields are re-read. Only those fields
that are marked with an '*' will be read by GAP when a caller returns
from a door.
When reading this file, you should not go into an EOF loop. In
other words, you should not read until you encounter End Of File.
Instead, you should read what you KNOW is there. This allows for
additions to the end of the file without forcing all programs to be
re-compiled.
----------
Note from Jim Harrer:
Beginning with WILDCAT! release 3, we will begin supporting this DOOR.SYS
Standard by creating this file in the \WC30\WCWORK\NODEx (x = Node Number)
directory. We will NOT read this file back in. If DOORS wish to change
any of the callers variables, then the door author should refer to our
USERINFO.DAT standard.
Mustang Software will not support any future changes to DOOR.SYS. Other
BBS authors must regard this DOOR.SYS as a "Standard" and not change or
add to it in any way. DOOR authors can be assured we will not change
DOOR.SYS in the future. Any changes we need to make will be done to our
USERINFO.DAT standard.
I hope other BBS authors will join us in agreement of not making any
additional changes to DOOR.SYS in the future.
----------
DOOR.SYS
--------
COM1: <-- Comm Port - COM0: = LOCAL MODE
2400 <-- Baud Rate - 300 to 38400
8 <-- Parity - 7 or 8
1 <-- Node Number - 1 to 99 (Default to 1)
19200 <-- DTE Rate. Actual BPS rate to use. (kg)
Y <-- Screen Display - Y=On N=Off (Default to Y)
Y <-- Printer Toggle - Y=On N=Off (Default to Y)
Y <-- Page Bell - Y=On N=Off (Default to Y)
Y <-- Caller Alarm - Y=On N=Off (Default to Y)
Rick Greer <-- User Full Name
Lewisville, Tx. <-- Calling From
214 221-7814 <-- Home Phone
214 221-7814 <-- Work/Data Phone
PASSWORD <-- Password
110 *<-- Security Level
1456 <-- Total Times On
03/14/88 <-- Last Date Called
7560 <-- Seconds Remaining THIS call (for those that particular)
126 <-- Minutes Remaining THIS call
GR <-- Graphics Mode - GR=Graph, NG=Non-Graph, 7E=7,E Caller
23 <-- Page Length
Y <-- User Mode - Y = Expert, N = Novice
1,2,3,4,5,6,7 <-- Conferences/Forums Registered In (ABCDEFG)
7 <-- Conference Exited To DOOR From (G)
01/01/99 <-- User Expiration Date (mm/dd/yy)
1 <-- User File's Record Number
Y <-- Default Protocol - X, C, Y, G, I, N, Etc.
0 *<-- Total Uploads
0 *<-- Total Downloads
0 *<-- Daily Download "K" Total
999999 <-- Daily Download Max. "K" Limit
10/22/88 <-- Caller's Birthdate (kg)
G:\GAP\MAIN <-- Path to the MAIN directory (where User File is) (kg)
G:\GAP\GEN <-- Path to the GEN directory (kg)
Michael <-- Sysop's Name (name BBS refers to Sysop as) (kg)
Stud <-- Alias name (rc)
00:05 <-- Event time (hh:mm) (rc)
Y <-- If its an error correcting connection (Y/N) (rc)
N <-- ANSI supported & caller using NG mode (Y/N) (rc)
Y <-- Use Record Locking (Y/N) (rc)
14 <-- BBS Default Color (Standard IBM color code, ie, 1-15) (rc)
10 *<-- Time Credits In Minutes (positive/negative) (rc)
07/07/90 <-- Last New Files Scan Date (mm/dd/yy) (rc)
14:32 <-- Time of This Call (hh:mm) (rc)
07:30 <-- Time of Last Call (hh:mm) (rc)
6 <-- Maximum daily files available (rc)
3 *<-- Files d/led so far today (rc)
23456 *<-- Total "K" Bytes Uploaded (rc)
76329 *<-- Total "K" Bytes Downloaded (rc)
A File Sucker <-- User Comment (rc)
10 <-- Total Doors Opened (rc)
10283 <-- Total Messages Left (rc)
***** Each line is STRAIGHT ASCII TEXT with a CR/LF at the end. *****
Lines marked with an '*' will be re-read in GAP when a caller
returns from a door.
Rick Greer, the author of this Universal Specification, is no
where to be found!
-EOF-